
-- 攻击等于本体 (这句话 我真是没法分析啊 加点伤害得了)
AddComponentPostInit('combat',function (self)
    local old_GetAttacked = self.GetAttacked
    function self:GetAttacked(attacker,damage,weapon,stimuli,spdamage,...)
        if attacker and attacker.prefab and attacker.prefab == 'yuemiheng_shadow' then
            if damage then
                damage = damage + 100
            end
        end
        return old_GetAttacked(self,attacker,damage,weapon,stimuli,spdamage,...)
    end
end)



-- 制作出来时
AddComponentPostInit('builder',function (self)
    local old_onBuild = self.onBuild
    function self.onBuild(inst,prod,...)
        local res = old_onBuild ~= nil and {old_onBuild(inst,prod,...)} or {}
        if prod and prod.prefab and prod.prefab == 'yuemiheng_shadow' and prod.components.follower then
            prod.components.follower:SetLeader(inst)
            prod.yuemiheng_owner_kleiid = self.inst.userid
            prod.yuemiheng_owner = self.inst
        end
        return unpack(res)
    end
end)